<?php
    @require_once("config.php");
	
	$con = $_GET["con"];
	$orderType = $_GET["orderType"];
	$type = $_GET["type"];

    $sql = "select count(*) from goodslist where goods_title like '%$con%' order by $orderType $type";
	// echo $sql;

    $result = mysql_query($sql);
	$item = mysql_fetch_array($result);
	
	$msg = array();
	$msg["count"] = $item[0];
	echo json_encode($msg);
//     $all = array();
//     while($item = mysql_fetch_assoc($result)){
//         $arr = array();
//         $arr["goods_id"] = $item["goods_id"];
//         $arr["goods_title"] = $item["goods_title"];
//         $arr["goods_price"] = $item["goods_current_price"];
//         $arr["goods_trade_num"] = $item["goods_trade_num"];
//         $arr["goods_pic"] = $item["goods_pic"];
//         $arr["goods_sub_pic"] = explode(",", $item["goods_sub_pic"]);
//         $arr["type"] =  $item["type"];
// 
//         $all[] = $arr;
//     }

    // echo json_encode($all);


?>